import { request } from '@/utils';

export function getPexelsList<T>(data: { page: number; size: number }) {
  return request<T>({
    url: '/pexels/list',
    method: 'get',
    params: data
  });
}

export function getHint<T, U = any>(q: U) {
  return request<T>({
    url: '/pexels/hint',
    method: 'get',
    params: {
      q
    }
  });
}

export function getThemes<T>() {
  return request<T>({
    url: '/pexels/themes',
    method: 'get'
  });
}

export function getPexelsFromId<T>(id: string) {
  return request<T>({
    url: `/pexels/${id}`,
    method: 'get'
  });
}
